
package com.cmc.service.impl;

import java.util.List;

import com.cmc.service.impl.BaseManager;
import com.cmc.model.Rest;
import com.cmc.dao.RestDao;
import com.cmc.service.RestManager;
/*
* @aegis.mapping
*/
public class RestManagerImpl extends BaseManager implements RestManager {
    private RestDao dao;

    /**
     * Set the Dao for communication with the data layer.
     * @param dao
     */
    public void setRestDao(RestDao dao) {
        this.dao = dao;
    }

    /**
     * @see com.cmc.service.RestManager#getRests(com.cmc.model.Rest)
     */
    public List getRests(final Rest rest) {
        return dao.getRests(rest);
    }

    /**
     * @see com.cmc.service.RestManager#getRest(String id)
     */
    public Rest getRest(final String id) {
        return dao.getRest(new Long(id));
    }

    /**
     * @see com.cmc.service.RestManager#saveRest(Rest rest)
     */
    public void saveRest(Rest rest) {
        dao.saveRest(rest);
    }

    /**
     * @see com.cmc.service.RestManager#removeRest(String id)
     */
    public void removeRest(final String id) {
        dao.removeRest(new Long(id));
    }
}
